package 线程停止;
class muthds extends Thread
{
	public void run()
	{
		super.run();
		try {
		for(int i=0;i<10000;i++)
		{
			System.out.println("i="+(i+1));
		}
		System.out.println("run begin");
		Thread.sleep(2000);
		System.out.println("run end");
	}
	catch(InterruptedException e)
	{
		System.out.println("先停止，在遇到sleep进入catch!"+this.isInterrupted());
		e.printStackTrace();
	}
	}
}
public class Test1_39 {

	public static void main(String[] args) {
		muthds thread=new muthds();
		thread.start();
		
		thread.interrupt();
		System.out.println("end!");

	}

}
